package ren.steve.model.system.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import ren.steve.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@ApiModel(description = "系统用户")
@TableName("system_user")
public class SystemUser extends BaseEntity {
	
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "员工工号")
	@TableField("code")
	private String code;

	@ApiModelProperty(value = "昵称")
	@TableField("nickname")
	private String nickname;

	@ApiModelProperty(value = "E-Mail")
	@TableField("email")
	private String email;

	@ApiModelProperty(value = "密码")
	@TableField("password")
	private String password;

	@ApiModelProperty(value = "用户姓名")
	@TableField("name")
	private String name;

	@ApiModelProperty(value = "手机")
	@TableField("phone")
	private String phone;

	@ApiModelProperty(value = "头像地址")
	@TableField("avatar")
	private String avatar;

	@ApiModelProperty(value = "部门ID")
	@TableField("dept_id")
	private Long deptId;

	@ApiModelProperty(value = "岗位ID")
	@TableField("post_id")
	private Long postId;

	@ApiModelProperty(value = "描述")
	@TableField("description")
	private String description;

	@ApiModelProperty(value = "角色列表")
	@TableField(exist = false)
	private List<SystemRole> roles = new ArrayList<>();

	@ApiModelProperty(value = "岗位名称")
	@TableField(exist = false)
	private String postTitle;

	@ApiModelProperty(value = "部门名称")
	@TableField(exist = false)
	private String deptTitle;
}

